<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">


<p:dialog id="dialogCadastro" modal="true" width="50%"
	appendTo="@(body)" resizable="true" draggable="true" closable="false"
	widgetVar="dialogCadastroMedico" header="Cadastro de Médico">
	<p:ajax event="close" listener="#{medicoVeterinarioMB.close}"
		update="frmDialogMedico" />
	<h:form id="frmDialogMedico">

		<h:panelGrid columns="2">

			<p:outputLabel value="Codigo:"></p:outputLabel>
			<p:inputText value="#{medicoVeterinarioMB.medico.medico.codigo}"
				disabled="true"></p:inputText>


			<p:outputLabel value="Matricula:"></p:outputLabel>
			<p:inputText value="#{medicoVeterinarioMB.medico.matricula}"
				disabled="true"></p:inputText>

			<p:outputLabel value="Nome:" for="nome"></p:outputLabel>
			<p:inputText id="nome"
				value="#{medicoVeterinarioMB.medico.dadosCadastro.nome}" size="60"
				disabled="#{medicoVeterinarioMB.consultando}" required="true"
				maxlength="100"></p:inputText>

			<p:outputLabel value="Função/Cargo:" for="cargo" />
			<p:inputText id="cargo" value="#{medicoVeterinarioMB.medico.cargo.descricao}" required="true"
				disabled="#{medicoVeterinarioMB.consultando}" size="30"
				>
			</p:inputText>


			<p:outputLabel value="Especialidade:" for="especialidade" />
			<p:inputText id="especialidade" required="true"
				value="#{medicoVeterinarioMB.medico.medico.especialidade.descricao}"
				size="30" disabled="#{medicoVeterinarioMB.consultando}">
			</p:inputText>

			<p:outputLabel value="CRMV:" for="crmv"></p:outputLabel>
			<p:inputText id="crmv" required="true"
				value="#{medicoVeterinarioMB.medico.medico.crmv}"
				placeholder="Somente Números"
				disabled="#{medicoVeterinarioMB.consultando}"
				requiredMessage="CRMV é obrigatório" size="30"
				onkeypress="return(mascaras(this,numero))"></p:inputText>

			<p:outputLabel value="Tipo Cirurgia:" />
			<p:inputText disabled="#{medicoVeterinarioMB.consultando}"
				value="#{medicoVeterinarioMB.medico.medico.tipoCirurgia}"
				maxlength="50" size="30"></p:inputText>
		</h:panelGrid>


		<h:panelGrid columns="2" style="border:0px">

			<p:commandButton value="Cancela"
				onclick="dialogCadastroMedico.hide()" immediate="true" />

		</h:panelGrid>
	</h:form>
</p:dialog>

</html>